package com.zhx.ad.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.zhx.ad.enums.CommonStatus;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 *describe: 用户实体类
 *
 *@author zhanghaixuan
 *@date 2019/02/02
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("ad_user")
public class AdUser extends Model<AdUser> {

	private String id;

	private String username;

	private String token;

	private Integer userStatus;

	private Date createTime;

	private Date updateTime;


	public AdUser(String username,String token){
		this.username = username;
		this.token = token;
		this.userStatus = CommonStatus.VALID.getStstus();
		this.createTime = new Date();
		this.updateTime = this.createTime;
	}
}
